﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Web.Security;

namespace WpfMembershipAdmin
{
    /// <summary>
    /// Interaction logic for RolePickerDialogWindow.xaml
    /// </summary>
    public partial class RolePickerDialogWindow : Window
    {
        public RolePickerDialogWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            RoleListView.Items.Clear();
            String[] allRoleNames = Roles.GetAllRoles();
            foreach (String s in allRoleNames)
            {
                RoleListView.Items.Add(new ListViewItem()
                {
                    Content = s
                });
            }
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}
